<?php

include("db_if.inc");

  class cms {

    function cms() {
      $this->user['authorized']       = true;
      $this->user['userid']       = "frank";
      $this->user['human_name']       = "Frank van Tol";
      $this->cmsurl           = "/_cms/";
      $this->cmspath          = realpath($_SERVER['DOCUMENT_ROOT'])."/_cms/" ;
      $this->contenturl       = "/";
      $this->contentpath      = realpath($_SERVER['DOCUMENT_ROOT'])."/";
      $this->db_user = 'root';
      $this->db_passwd = '';
      $this->db = new db_if('onk',$this->db_user, $this->db_passwd);
      $this->db->set_messages("succesvol toegevoegd...", "succesvol aangepast...", "succesvol verwijderd!");
      // Install our own error handler
//      $old_error_handler = set_error_handler(array($this,"errorHandler"));
      $this->binary_buffer = "";
    }

    function errorHandler($errno, $errmsg, $filename, $linenum, $vars) {
       $errstr = "<div class=\"error\">";
       $errstr .= "$errmsg ($filename:$linenum)";
       $errstr .= "</div>\n";
       echo "$errstr";
       // External logging removed for now
    }

}

$cms = new cms();

?>

